package org.company.ci.actions;

import org.company.ci.domain.User;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

/**
 * Clase encargada de dar seguridad a todas las acciones de la aplicacion.
 *  
 * @author Hudy 02/12/2010
 * @version 1.0
 */
public class AppSecurityActionSupport extends ActionSupport {
	
	public static final String ACCESS_DENIED = "access_denied";
	
	protected String message;
	
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	protected boolean existUserSession() {
		
		User usuario = (User) ActionContext.getContext().getSession().get("user_login");
		
		return usuario != null;
	}

}
